<?php
namespace App\Pay\Gateway\Alipay;

class ScanGateway extends Gateway
{

    /**
     * @param $payload array
     */
    public function pay($payload)
    {
        $payload['method'] = $this->getMethod();
        $payload['sign'] = Sign::get($payload);
        return Request::api($payload);
    }

    public function getMethod(): string
    {
        return 'alipay.trade.precreate';
    }
}
